home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / system / sh1_111.zip / DLN.SH < prev    next >
Text File  |  1987-08-31  |  438b  |  17 lines

  1. ^  dln - delete files not in wildcard list              ^
  2. local FLN
  3. if %# == 0
  4.   echo !
  5.   Delete files not in wildcard list
  6.   usage:   dln <filespecs>
  7.   example: dln *.arc  ; dln will delete all files which are not .arc files
  8.   !
  9.   exit
  10. endif
  11. shx -dfn1 %0 > %{SH1FILES}sh1tmp1
  12. shx -dfn1 *.* | xtr -f -I -k%{SH1FILES}sh1tmp1 -v > %{SH1FILES}sh1tmp2
  13. for FLN infile %{SH1FILES}sh1tmp2
  14.   echo Deleting %FLN
  15.   del %FLN
  16. endfor
  17.